﻿using Windows.Devices.Geolocation;
using BuddyTracker.Model;

namespace BuddyTracker.Interfaces
{
    /// <summary>
    /// Interface describing encoder for messages.
    /// </summary>
    interface ILocationEncoder
    {
        /// <summary>
        /// Encodes a geopoint to application readable string ready for posting.
        /// </summary>
        /// <param name="location">Passed geopoint.</param>
        /// <returns>Encoded string.</returns>
        string EncodeLocation(Geopoint location);
        /// <summary>
        /// Decodes passed string to new object of User containing last seen date and location.
        /// </summary>
        /// <param name="s">String for decoding.</param>
        /// <returns>User object with location and last seen date.</returns>
        User DecodeString(string s);
    }
}
